feat(migration): add type renaming to resolve native asset name conflicts#472
feat(migration): add type renaming to resolve native asset name conflicts#472MyvTsv wants to merge 5 commits into
Conversation
|
Does this apply to names that are too long? And CLI ? |
|
CLI compatibility would be a plus. |
|
At the time of renaming, it should also be ensured that the total length (PluginGenericObject + New name) does not exceed the maximum allowed size for MySQL table names. |
Rom1-B
left a comment
There was a problem hiding this comment.
It works.
Could you add a check that alerts if the table name exceeds 64 characters?
In the CLI, add at least one check and a message to prompt renaming in the interface.
Rom1-B
left a comment
There was a problem hiding this comment.
We also need to add the case where the Fields plugin adds fields
…ed in Fields dropdowns
| ], | ||
| ] | ||
| ); | ||
| foreach ($fkey_column_iterator as $fkey_column) { |
There was a problem hiding this comment.
If the renaming succeeds for the first few columns but then fails, the columns that have already been renamed are not rolled back, and a RuntimeException is thrown.
Should we perhaps wrap the foreach loop in a transaction?!
| 'table_name AS TABLE_NAME', | ||
| 'column_name AS COLUMN_NAME', | ||
| ], | ||
| 'FROM' => 'information_schema.columns', |
There was a problem hiding this comment.
Here too, use SHOW TABLES LIKE ‘glpi\_plugin\_fields\_%’ + $DB->listFields($table) to maintain consistency with the rest of the code.
Description
Screenshots (if appropriate):
Conflict:

Migrate
